<template><div><h2 id="卡片" tabindex="-1"><a class="header-anchor" href="#卡片"><span>卡片</span></a></h2>
<h2 id="card" tabindex="-1"><a class="header-anchor" href="#card"><span>Card</span></a></h2>
<div class="language-php line-numbers-mode" data-highlighter="prismjs" data-ext="php" data-title="php"><pre v-pre class="language-php"><code><span class="line"><span class="token php language-php"><span class="token delimiter important">&lt;?php</span></span>
<span class="line"></span>
<span class="line"><span class="token keyword">use</span> <span class="token package">Dcat<span class="token punctuation">\</span>Admin<span class="token punctuation">\</span>Widgets<span class="token punctuation">\</span>Card</span><span class="token punctuation">;</span></span>
<span class="line"></span>
<span class="line"><span class="token comment">// 只填充内容，不需要标题</span></span>
<span class="line"><span class="token variable">$card</span> <span class="token operator">=</span> <span class="token class-name static-context">Card</span><span class="token operator">::</span><span class="token function">make</span><span class="token punctuation">(</span><span class="token function">view</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'...'</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"></span>
<span class="line"><span class="token comment">// 标题和内容</span></span>
<span class="line"><span class="token variable">$card</span> <span class="token operator">=</span> <span class="token class-name static-context">Card</span><span class="token operator">::</span><span class="token function">make</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'标题'</span><span class="token punctuation">,</span> <span class="token string single-quoted-string">'内容'</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"></span>
<span class="line"><span class="token comment">// 设置间距</span></span>
<span class="line"><span class="token variable">$card</span><span class="token operator">-></span><span class="token function">padding</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'0 15px 0 12px'</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"></span>
<span class="line"><span class="token comment">// 设置工具按钮</span></span>
<span class="line"><span class="token variable">$card</span><span class="token operator">-></span><span class="token function">tool</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'&lt;button class="btn btn-sm btn-light shadow-none">按钮&lt;/button>'</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"></span>
<span class="line"><span class="token comment">// 设置底部内容</span></span>
<span class="line"><span class="token variable">$card</span><span class="token operator">-></span><span class="token function">footer</span><span class="token punctuation">(</span><span class="token function">view</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'...'</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"></span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="box" tabindex="-1"><a class="header-anchor" href="#box"><span>Box</span></a></h2>
<div class="language-php line-numbers-mode" data-highlighter="prismjs" data-ext="php" data-title="php"><pre v-pre class="language-php"><code><span class="line"><span class="token php language-php"><span class="token delimiter important">&lt;?php</span></span>
<span class="line"></span>
<span class="line"><span class="token keyword">use</span> <span class="token package">Dcat<span class="token punctuation">\</span>Admin<span class="token punctuation">\</span>Widgets<span class="token punctuation">\</span>Box</span><span class="token punctuation">;</span></span>
<span class="line"></span>
<span class="line"><span class="token comment">// 标题和内容</span></span>
<span class="line"><span class="token variable">$box</span> <span class="token operator">=</span> <span class="token class-name static-context">Box</span><span class="token operator">::</span><span class="token function">make</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'标题'</span><span class="token punctuation">,</span> <span class="token string single-quoted-string">'内容'</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"></span>
<span class="line"><span class="token comment">// 设置间距</span></span>
<span class="line"><span class="token variable">$box</span><span class="token operator">-></span><span class="token function">padding</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'0 15px 0 12px'</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"></span>
<span class="line"><span class="token comment">// 设置工具按钮</span></span>
<span class="line"><span class="token variable">$box</span><span class="token operator">-></span><span class="token function">tool</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'&lt;button class="btn btn-sm btn-light shadow-none">按钮&lt;/button>'</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"></span>
<span class="line"><span class="token comment">// 设置收缩按钮</span></span>
<span class="line"><span class="token variable">$box</span><span class="token operator">-></span><span class="token function">collapsable</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"></span>
<span class="line"><span class="token comment">// 设置移除按钮</span></span>
<span class="line"><span class="token variable">$box</span><span class="token operator">-></span><span class="token function">removable</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
<span class="line"></span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></div></template>


